<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>IT Assistant - AI智能助手</title>
    {% load static %}
    <link rel="stylesheet" href="{% static 'css/style.css' %}">
</head>
<body>
    <div class="chat-header">
        <h1>🤖 IT Assistant AI助手</h1>
        <a href="/" class="back-btn">返回首页</a>
    </div>

    <div class="chat-container">
        <div class="chat-messages" id="chatMessages">
            <!-- 消息动态插入 -->
        </div>

        <div class="typing-indicator" id="typingIndicator">
            <div class="typing-dots">
                <span></span>
                <span></span>
                <span></span>
            </div>
        </div>

        <!-- 上传进度 -->
        <div class="upload-progress" id="uploadProgress" style="display: none;">
            解析中: <span id="progressText">0%</span>
        </div>

        <div class="chat-input-container">
            <!-- 上传按钮 -->
            <label class="upload-btn">
                📎 上传文件
                <input type="file" id="fileUpload" accept=".txt,.xlsx,.xls,.docx,.pdf" class="file-input-hidden">
            </label>
            
            <textarea 
                class="chat-input" 
                id="messageInput" 
                placeholder="输入您的问题或上传文件...（Enter发送，Shift+Enter换行）"
                rows="1"
            ></textarea>
            <button class="send-btn" id="sendButton">发送</button>
        </div>
    </div>

    <script src="{% static 'js/chat.js' %}"></script>
</body>
</html>